const IS_PROD = ['production','test'].includes(process.env.VUE_APP_ENV)
const plugins = [
	// 配置路由懒加载插件
	["@babel/plugin-syntax-dynamic-import"],
	// vant按需加载
	["import", {
		"libraryName": "vant",
		"libraryDirectory": "es",
		"style": true
	}, 'vant'],
]

// 去除 console.log
if (IS_PROD) {
  plugins.push('transform-remove-console')
}

module.exports = {
	presets: [
		['@vue/cli-plugin-babel/preset']
	],
	plugins
}
